package com.gitee.starblues.factory.process.pipe.classs.group;

import com.gitee.starblues.factory.process.pipe.classs.PluginClassGroup;
import com.gitee.starblues.realize.BasePlugin;
import com.gitee.starblues.utils.AnnotationsUtils;

import javax.ws.rs.ext.Provider;

/**
 * 分组存在注解: @Provider
 *
 * @author starBlues
 * @version 2.1.0
 */
public class ProviderGroup implements PluginClassGroup {


    /**
     * spring @Provider 注解bean
     */
    public static final String GROUP_ID = "spring_provider";


    @Override
    public String groupId() {
        return GROUP_ID;
    }

    @Override
    public void initialize(BasePlugin basePlugin) {

    }

    @Override
    public boolean filter(Class<?> aClass) {
        return AnnotationsUtils.haveAnnotations(aClass, false, Provider.class);
    }
}
